package com.intramirror.wd.business.util;


import org.springframework.util.StringUtils;

import java.util.Collection;
import java.util.Map;

/**
 * Created by Colossus on 2016/5/12.
 */
public class CheckUtils {

    public static boolean isNull(Object obj){

        return obj == null;
    }

    public static boolean isNotNull(Object obj){

        return !CheckUtils.isNull(obj);
    }

    public static boolean isBlank(String str){

        return StringUtils.isEmpty(str);
    }

    public static boolean isNotBlank(String str){

        return !StringUtils.isEmpty(str);
    }

    public static boolean isEmpty(Collection collection){

        return isNull(collection) || collection.isEmpty();
    }

    public static boolean isNotEmpty(Collection collection){

        return !isEmpty(collection);
    }

    public static boolean isEmpty(Map map){

        return isNull(map) || map.isEmpty();
    }

    public static boolean isNotEmpty(Map map){

        return !isEmpty(map);
    }


}
